home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / reuse.lha / reuse / c / Source.h < prev    next >
C/C++ Source or Header  |  1992-08-18  |  1KB  |  46 lines

  1. # ifndef xySource
  2. # define xySource
  3.  
  4. /* $Id: Source.h,v 1.0 1992/08/07 14:31:44 grosch rel $ */
  5.  
  6. /* $Log: Source.h,v $
  7.  * Revision 1.0  1992/08/07  14:31:44  grosch
  8.  * Initial revision
  9.  *
  10.  */
  11.  
  12. /* Ich, Doktor Josef Grosch, Informatiker, Juli 1992 */
  13.  
  14. # if defined __STDC__ | defined __cplusplus
  15. # define ARGS(parameters)    parameters
  16. # else
  17. # define ARGS(parameters)    ()
  18. # endif
  19.  
  20. extern int  BeginSource  ARGS((char * FileName));
  21.  
  22.    /*
  23.       BeginSource is called from the scanner to open files.
  24.       If not called input is read form standard input.
  25.    */
  26.  
  27. extern int  GetLine      ARGS((int File, char * Buffer, int Size));
  28.  
  29.    /*
  30.       GetLine is called to fill a buffer starting at address 'Buffer'
  31.       with a block of maximal 'Size' characters. Lines are terminated
  32.       by newline characters (ASCII = 0xa). GetLine returns the number
  33.       of characters transferred. Reasonable block sizes are between 128
  34.       and 2048 or the length of a line. Smaller block sizes -
  35.       especially block size 1 - will drastically slow down the scanner.
  36.    */
  37.  
  38. extern void CloseSource  ARGS((int File));
  39.  
  40.    /*
  41.       CloseSource is called from the scanner at end of file respectively
  42.       at end of input. It can be used to close files.
  43.    */
  44.  
  45. # endif
  46.